package com.nicolasprof.profgallery.effects {
	import flash.geom.Point;	
	
	import com.nicolasprof.profgallery.effects.Effect;
	
	/**
	 * @author Nicolas Prof
	 */
	public class ParticleEffect extends Effect {

		public static const CENTER : String = "center";
		public static const TOP : String = "top";
		public static const BOTTOM : String = "bottom";

		public function ParticleEffect() {
			super();
		}

		protected function getOffset($width : int, $height: int, $regPoint:String = ParticleEffect.CENTER) : Point {
			var posX:int, posY:int;
			
			switch($regPoint){
				case BOTTOM : 
					posX = -$width * 0.5;
					posY = -$height;
					break;
				case CENTER : 
					posX = -$width * 0.5;
					posY = -$height * 0.5;
					break;
				case TOP : 
					posX = -$width * 0.5;
					break;
			}
			
			return new Point(posX, posY);
		}
	}
}
